package testing;


import java.util.HashMap;

import junit.framework.Assert;
import logicaDePredicados.LogicPredicate;
import logicaDePredicados.Pair;

import org.junit.Before;
import org.junit.Test;

import exceptions.UnDecidibleValueException;

public class LogicPredicatePairTest {
	//LogicPredicate<Pair<String,String>> loves = new LogicPredicate<Pair<String,String>>("loves");
	private HashMap<Pair<String,String>,Boolean> loves = new HashMap<Pair<String,String>, Boolean>();
	
	@Before
	public void setUp() throws Exception {
		loves.put(new Pair<String, String>("John","Mary"), true);
		loves.put(new Pair<String, String>("John","John"), true);
		loves.put(new Pair<String, String>("John","Peter"), true);
		loves.put(new Pair<String, String>("John","Julie"), true);
		loves.put(new Pair<String, String>("Julie","Mary"), true);
		loves.put(new Pair<String, String>("John","Mark"), true);
		loves.put(new Pair<String, String>("John","Ursula"), true);
		loves.put(new Pair<String, String>("Ursula","Mary"), false);
		loves.put(new Pair<String, String>("Ursula","John"), false);
		loves.put(new Pair<String, String>("Ursula","Mark"), false);
		
	}
	@Test
	public void testCase() throws UnDecidibleValueException {
		Assert.assertNotNull(loves);
		System.out.println(loves);
		Pair<String,String> johnJohn = new Pair<String, String>("John","John");
		//Assert.assertEquals(loves.get(johnJohn).booleanValue(),true);
//		Assert.assertEquals(loves.get(new Pair<String,String>	("John","Ursula")).booleanValue(),true);
	//	Assert.assertEquals(loves.get(new Pair<String,String>	("Ursula","John")).booleanValue(),false);
		Assert.assertNotNull(loves.get(johnJohn));
	}
	
}
